﻿namespace jisuanqi
{
    public class operation_factory
    {
        public static operation create_operation(string str_operation)
        {
            operation oper = null;
            switch (str_operation)
            {
                case "+":
                    oper = new operation_add();
                    break;

                case "-":
                    oper = new operation_sub();
                    break;

                case "*":
                    oper = new operation_mul();
                    break;

                case "/":
                    oper = new operation_div();
                    break;

                case "16-10":
                    oper = new operation_16to10();
                    break;
            }

            return oper;
        }
    }
}